import request from '@/utils/request'

// 查询库位列表
export function listLocator(query) {
  return request({
    url: '/wms/locator/list',
    method: 'get',
    params: query
  })
}

export function locatores(query) {
  return request({
    url: '/wms/locator/locatores',
    method: 'get',
    params: query
  })
}

// 初始化
export function initBean(data) {
    return request({
        url: '/wms/locator/initBean',
        method: 'post',
        data: data
    })
}

// 查询库位详细
export function getLocator(id) {
  return request({
    url: '/wms/locator/' + id,
    method: 'get'
  })
}

// 新增库位
export function addLocator(data) {
  return request({
    url: '/wms/locator',
    method: 'post',
    data: data
  })
}

// 修改库位
export function updateLocator(data) {
  return request({
    url: '/wms/locator',
    method: 'put',
    data: data
  })
}

// 删除库位
export function delLocator(id) {
  return request({
    url: '/wms/locator/' + id,
    method: 'delete'
  })
}
// 新增库位
export function addBatchLocator(data) {
  return request({
    url: '/wms/locator/addBatchLocator',
    method: 'post',
    data: data
  })
}
// 新增格口
export function addBatchLocators(data) {
  return request({
    url: '/wms/locator/addBatchLocators',
    method: 'post',
    data: data
  })
}

//分配货架
export function planBatchLocators(data) {
  return request({
    url: '/wms/locator/planBatchLocators',
    method: 'post',
    data: data
  })
}
